package server;

import java.io.IOException;

/**
 * @program: minicat
 * @description
 * @author: luffy
 * @create: 2020-08-02 22:15
 */
public class LearnServlet extends HttpServlet {
    @Override
    public void doGet(Request request, Response response) {
        String content = "<h1>learnServlet get</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(content.getBytes().length)+content);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void doPost(Request request, Response response) {
        String content = "<h1>learnServlet Post</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(content.getBytes().length)+content);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void init() throws Exception {

    }

    @Override
    public void destory() throws Exception {

    }
}
